import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '@/views/index.vue'
import Code from '@/views/code.vue'
import Video from '@/views/video.vue'
import VideoCanvas from '@/views/videoCanvas.vue'
import jmuxer from '@/views/jmuxer.vue'
import h264Converter from '@/views/h264Converter.vue'
const routes = [
  // {
  //   path:'/',
  //   redirect:'/idiom'
  // },
  {
    path: '/index',
    name: 'Index',
    component: Index,
    meta:{
      title:'视频'
    }
  },
  {
    path: '/',
    name: 'jmuxer',
    component: jmuxer,
    meta:{
      title:'直播'
    }
  },
  // {
  //   path: '/',
  //   name: 'Index1',
  //   component: ()=>import('@/views/index1.vue'),
  //   redirect:'/canvasVideo',
  //   meta:{
  //     title:'首页'
  //   },
  //   children:[
  //     {
  //       path: '/canvasVideo',
  //       name: 'jmuxer',
  //       component: jmuxer,
  //       meta:{
  //         title:'视频流3'
  //       }
  //     },
  //     {
  //       path: '/canvasVideo2',
  //       name: 'h264Converter',
  //       component: h264Converter,
  //       meta:{
  //         title:'视频流4'
  //       }
  //     },
  //   ]
  // },
  {
    path: '/code',
    name: 'Code',
    component: Code,
    meta:{
      title:'打字机'
    }
  },
  {
    path: '/video',
    name: 'video',
    component: Video,
    meta:{
      title:'视频流'
    }
  },
  {
    path: '/videoCanvas',
    name: 'videoCanvas',
    component: VideoCanvas,
    meta:{
      title:'视频流2'
    }
  },
  
 
 
  
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
